package com.ccys.cms.controller.masterData;

import com.ccys.cms.service.masterData.PricingTimingService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.masterData.PricingTimingIdDto;
import com.ccys.db.dto.masterData.PricingTimingPageQueryDto;
import com.ccys.db.dto.masterData.PricingTimingSaveDto;
import com.ccys.db.vo.masterData.PricingTimingPageQueryVo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: WhiteCoat
 * @description: 问诊价格设置接口
 * @author: ZhangJingCan
 * @create: 2023-12-13 17:56
 **/

@RestController
@RequestMapping("masterData")
@Api(tags = "masterData-问诊价格设置接口")
public class PricingTimingController {

    @Autowired
    private PricingTimingService pricingTimingService;



    
    @PostMapping("pricingTiming")
    @ApiOperation("保存问诊价格")
    public ResponseResult savePricingTiming(PricingTimingSaveDto dto) {
        return pricingTimingService.savePricingTiming(dto);
    }

    @PutMapping("pricingTiming")
    @ApiOperation("修改问诊价格")
    public ResponseResult updatePricingTiming(PricingTimingSaveDto dto) {
        return pricingTimingService.savePricingTiming(dto);
    }

    
    @DeleteMapping("pricingTiming")
    @ApiOperation("根据ID删除问诊价格")
    public ResponseResult deletePricingTiming(PricingTimingIdDto dto) {
        return pricingTimingService.deletePricingTiming(dto);
    }

    
    @GetMapping("pricingTiming")
    @ApiOperation("分页查询问诊价格")
    public ResponseResult<PageInfo<PricingTimingPageQueryVo>, Object> findPagePricingTiming(PricingTimingPageQueryDto dto) {
        return pricingTimingService.findPagePricingTiming(dto);
    }

    
    @PutMapping("pricingTiming/status")
    @ApiOperation("根据ID修改问诊价格状态")
    public ResponseResult updatePricingTimingStatus(PricingTimingIdDto dto) {
        return pricingTimingService.updatePricingTimingStatus(dto);
    }

}
